<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<%@include file="/commons/commonList.jsp" %>

<script type="text/javascript">

	function init(){
		parent.window.document.all('chargeItemList').style.height=document.body.scrollHeight;
	}
	function setCurrentId(id){

	  if('${MenuFlat}'=='false'){
	   return false;
	  }

	 parent.setCurrentChargeItemtId(id);
	}

	function refleshFrame(){
	parent.refleshFrame();
	}

	function rightMenu(event){

	if('${MenuFlat}'=='false'){
	return false;
	}

	return ShowContextMenu(event,'quick_rightmenu');
	}

</script>
</head>
<body onload="init();">
<div style="height:180px;overflow:auto;">
	<ec:ceTable items="chargeItemList"
			autoIncludeParameters="true"
			var="chargeItemItem"
			action="{ctx}/customerService_dispatchFormAction.do?method=findChargeItemByPage"
			rowsDisplayed="${totalRows}"
			width="100%"
			view="pmsNoPageView"
			styleClass="gridData"
			>
			<ec:ceRow styleClass="grid" onclick="setCurrentId('${chargeItemItem.keyword}');" ondblclick="return false" onContextMenu="return rightMenu(event);">
				<ec:ceColumn headerCell="pmsHeadrCell" width="13%" property="code" title="编 号"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="15%" property="name" title="名 称"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="12%" property="preDraw" title="预计领用数量"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="12%" property="customerUsage" title="实际数量"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="10%" property="handBack" title="退还数量"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="10%" property="price" title="单 价">
				<c:if test="${chargeItemItem.price!='0.00'}">${chargeItemItem.price}</c:if>
                 <c:if test="${chargeItemItem.price=='0.00'}">&#160;</c:if>
				</ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="10%" property="fee" title="金 额">
				<c:if test="${chargeItemItem.fee!='0.00'}">${chargeItemItem.fee}</c:if>
                 <c:if test="${chargeItemItem.fee=='0.00'}">&#160;</c:if>
				</ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="10%" property="remark" title="备 注"></ec:ceColumn>
			   <ec:parameter name="dispatchFormId" value="${dispatchFormId}"></ec:parameter>
			   <ec:parameter name="MenuFlat" value="${MenuFlat}"></ec:parameter>

			</ec:ceRow>
	</ec:ceTable>
	 <table width="100%" border="0" cellspacing="0" cellpadding="0"  class='gridData2'>
               <tr  class="grid">
                 <td width="62%" align="left" class="chareg_hj">&nbsp;&nbsp;应收合计：</td>
				 <td width="10%" align="right" class="chareg_hj">&nbsp;</td>
				 <td width="10%" align="right" class="chareg_hj"><span class="font_red"><fmt:formatNumber pattern="###,##0.00" value="${countFee!=null?countFee:0}"/></span>&nbsp;元&nbsp;</td>
				 <td width="10%" align="right" class="chareg_hj">&nbsp;</td>
				 <td width="10%" align="right" class="chareg_hj">&nbsp;</td>
               </tr>
     </table>

</div>
<!--------------------右键菜单---------------------->
<div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_rightmenu">
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">
    <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
      <pms:AuthTag authName="customerService_dispatchFormAction.do?method=navigateChargeItemAdd">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onClick="parent.addChargeItem();return false;"onFocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新增"/>&nbsp;新 增</a></td>
        </tr>
        </pms:AuthTag>
        <pms:AuthTag authName="customerService_dispatchFormAction.do?method=navigateChargeItemEdit">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onClick="parent.editChargeItem();return false;"onFocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" border="0" align="absbottom" alt="修改"/>&nbsp;修 改</a></td>
        </tr>
        </pms:AuthTag>
        <pms:AuthTag authName="customerService_dispatchFormAction.do?method=deleteServItem">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick="parent.deleteChargeItem();return false;"><img src="${ctx}/images/ico_delete.gif" alt="删除" border="0" align="absbottom"/>&nbsp;删除</a></td>
        </tr>
        </pms:AuthTag>

      </table></td>
    </tr>
  </table>
  </table>
  <script type="text/javascript">

	var div1=document.getElementById('quick_rightmenu');
	if(div1.getElementsByTagName("tr").length==1){
	div1.innerHTML="";
	}


</script>
</div>
</body>
<script type="text/javascript">
     if(typeof(parent.setHideCredit) =='function'){
     parent.setHideCredit('${countFee}');
     }
</script>
</html>